
Pod::Spec.new do |s|
  # ------------------ 组件基本信息段---------------------
  s.name             = 'SweetCordovaKit'
  s.version          = '0.2.3'
  s.summary          = 'A short description of SweetCordovaKit.'
  s.description      = <<-DESC
   cordova 基础库
DESC
  s.ios.deployment_target = '9.0'

  # 1. Dynamic 动态库、2. Static  静态库、3. Library 三方库封装，如HPR，OpenSSL
#  library_type       = "Dynamic"
  s.static_framework = true

  s.author           = { '朱帅帅' => 'shuaishuai.zhu@geely.com' }
  s.homepage         = 'http://git.evun.cn/ADMP-repository/SweetCordovaKit'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }

#  if ENV['mode'].to_s.include? "SweetCordovaKit"
    #使用zip成果物模式
    puts "SweetCordovaKit成果物模式集成".blue
    s.source           = { :http => 'https://geely-admp-oss.oss-cn-hangzhou.aliyuncs.com/sweet-app-release/ios/SweetCordovaKit.framework-0.2.3.zip' }
    s.ios.vendored_framework   = 'SweetCordovaKit.framework'
    s.source_files = 'SweetCordovaKit.framework/**/*.h'
    s.public_header_files = 'SweetCordovaKit.framework/**/*.h'
    s.ios.resource = [
      'SweetCordovaKit.framework/Versions/A/Resources/*.{png,xib,storyboard,bundle,xcassets,xml}'
    ]
#  else
#  #目前默认源码集成
#  puts "SweetCordovaKit源码模式集成".yellow
#    s.source           = { :git => 'https://gitlab.geely.com/p-admp/ios-common-kit/ios-sweetcordovakit.git', :tag => s.version.to_s }
#    # ------------------ 组件资源---------------------
#    s.source_files = 'SweetCordovaKit/Classes/**/*.{h,m}'
#    s.public_header_files  = 'SweetCordovaKit/Classes/**/*.h'
#
#    s.ios.resource = [
#      'SweetCordovaKit/Assets/**/*.{png,xib,storyboard,bundle,xcassets,xml}',
#      'SweetCordovaKit/Classes/**/*.{png,xib,storyboard,xml}'
#    ]
#    s.ios.frameworks = 'UIKit','Foundation'
#  end

  # ------------------ 组件依赖---------------------

  # Weex核心库
  s.dependency 'Cordova'
  # s.dependency 'cordova-plugin-wkwebview-engine' ,'~>1.2.1'

  # 底层工具库
  s.dependency 'HybridImplementKit'
  s.dependency 'SweetCoreKit'
  #目前指定版本
  s.dependency 'AFNetworking', '~> 4.0.0'


  #------------------ 组件info配置 --------------------------
  s.pod_target_xcconfig  = {
      'FRAMEWORK_SEARCH_PATHS'        => '$(inherited) ${PODS_ROOT}/**',
      'LIBRARY_SEARCH_PATHS'          => '$(inherited) ${PODS_ROOT}/**',
      'ENABLE_BITCODE'                => 'NO',
      'OTHER_LDFLAGS'                 => '$(inherited) -ObjC',
      'STRINGS_FILE_OUTPUT_ENCODING'  => 'UTF-8',
      'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES'
  }



end
